﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DeveloperSite.Master" AutoEventWireup="true" 
    CodeBehind="AddIPMetadata.aspx.cs" Inherits="AmkeniCrossLoginApplication.Amkeni_System.CO.Edit.AddIPMetadata" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="CustomDropDownList" Namespace="CustomDropDownList" TagPrefix="ddl" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

    <span class="breadcrumb">
        <asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
    </span>

    <asp:EntityDataSource ID="RFPDataSource" runat="server" ConnectionString="name=Amkeni_DatabaseEntities" 
        DefaultContainerName="Amkeni_DatabaseEntities" EnableFlattening="False" EntitySetName="RFPs" 
        Select="it.[RFP_id], it.[RFP_name]"></asp:EntityDataSource>

    <asp:Label ID="error" runat="server" Visible="false"></asp:Label>
    <br />
    <asp:Label ID="Label3" runat="server" Text="UPLOAD IMPLEMENTING PARTNER SCANNED DOCUMENTS" 
        CssClass="ContentHead"></asp:Label>
    <br />
    
    <%--TRY AND USE A DATAGRID--%>

    <%--TRY AND USE A DATAGRID--%>

    <asp:Table ID="Table1" runat="server" GridLines="Both" CssClass="NewGrid">
        <%--<asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label1" runat="server" Text="Select the Call"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:DropDownList ID="RFPList" runat="server" DataSourceID="RFPDataSource" 
                    DataTextField="RFP_name" DataValueField="RFP_id" AppendDataBoundItems="true"
                    AutoPostBack="true" OnSelectedIndexChanged="RFPList_SelectedIndexChanged">
                    <asp:ListItem Selected="True" Text="Select a Call" Value="0" />
                </asp:DropDownList>
                &nbsp;&nbsp;
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ForeColor="Red"
                    ControlToValidate="RFPList" InitialValue="N/A" ValidationGroup="plan" SetFocusOnError="true"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label2" runat="server" Text="Select the Implementing Partner"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ddl:CustomDropDownList ID="IPList" runat="server" AutoPostBack="true"
                    DataTextField="abbreviation" DataValueField="ip_id" OnDataBound="IPList_DataBound"
                    AppendDataBoundItems="true" OnSelectedIndexChanged="IPList_SelectedIndexChanged">
                    <asp:ListItem Selected="True" Text="N/A" Value="0" Enabled="true" />
                </ddl:CustomDropDownList>
                &nbsp;&nbsp;
                <asp:RequiredFieldValidator ID="V2" runat="server" ErrorMessage="*" ForeColor="Red"
                    ControlToValidate="IPList" InitialValue="N/A" ValidationGroup="plan" SetFocusOnError="true"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>--%>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label4" runat="server" Text="Upload the Scanned Contract"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="ContractFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="ContractFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label5" runat="server" Text="Upload the scanned Workplan"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="WorkPlanFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="WorkPlanFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label6" runat="server" Text="Upload the Scanned Budget"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="BudgetFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="BudgetFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label7" runat="server" Text="Upload the Scanned Log Frame"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                    <ajaxToolkit:AjaxFileUpload ID="LogFrameFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="LogFrameFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label8" runat="server" Text="Upload the Scanned Registration Certificate"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="RegCertFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="RegCertFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label9" runat="server" Text="Upload the Scanned FACE FORM"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="FaceFormFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="FaceFormFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label10" runat="server" Text="Upload the Scanned Specimen Signature"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="SpecSignFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="SpecSignFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label11" runat="server" Text="Upload the Scanned Vendor Form"></asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <ajaxToolkit:AjaxFileUpload ID="VendorFormFileUpload" runat="server" 
                    MaximumNumberOfFiles="1" OnClientUploadError="uploadError" 
                    AllowedFileTypes="pdf" OnClientUploadComplete="uploadComplete"
                    OnUploadComplete="VendorFormFileUpload_UploadComplete"/>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>

    <script type="text/javascript">
        function uploadComplete(sender) {
            $get("<%=lblMessage.ClientID%>").innerHTML = "File Uploaded Successfully";
        }
        function uploadError(sender) {
            $get("<%=lblMessage.ClientID%>").innerHTML = "File Uploaded Failed";
        }
    </script>
    <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>

</asp:Content>
